<?php
//connet_db
include "connector.php";

if(isset($_GET['myusername']) && isset($_GET['mypassword'])){

$myusername = $_GET['myusername'];
$mypassword = $_GET['mypassword'];

$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);

$getUser_sql="SELECT * FROM user WHERE username='$myusername' and password='$mypassword'";
    $getUser=mysql_query($getUser_sql);
    $getUser_result = mysql_fetch_assoc($getUser);
    $getUser_RecordCount = mysql_num_rows($getUser);
    
    if($getUser_RecordCount < 1){
        echo '0';
    } else { 
        session_register("myusername");
        session_register("mypassword");
    } 
}